package net.itbaiyang.pattern.sms;


import net.itbaiyang.pattern.component.SmsComponent;
import net.itbaiyang.pattern.component.adapter.SenderAdapter;
import net.itbaiyang.pattern.controller.request.SmsRequest;
import net.itbaiyang.pattern.util.JsonData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;



@Service("customAliyunSmsService")
// 阿里云短信服务实现
public class AliyunSmsService implements SmsService {


    @Autowired
    SenderAdapter send;

    @Override
    public JsonData sendSms(SmsRequest request) {
        // 阿里云短信发送逻辑...
        return send.aliSendCode(request.getPhoneNumber(),request.getMessage());
    }
}
